Image processing apparatus and method

ABSTRACT

To eliminate a signal deviation that occurs when scaling processing is performed on image data including multiple signals having different data rates, there is provided an image processing apparatus which performs scaling processing on image data including multiple signals having different data rates and includes a first scaling processing unit that performs a first scaling processing according to a first scale factor in a first area; and a second scaling processing unit that performs a second scaling processing subsequent to the first scaling processing, according to a second scale factor in a second area adjacent to the first area, on a signal having a high data rate using the first scale factor, and performs the second scaling processing on a signal having a low data rate using the second scale factor obtained by correcting the first scale factor, after the first scaling processing.

BACKGROUND

1. Field of the Invention

The present invention relates to an image processing apparatus andmethod, and more particularly, to an image processing apparatus andmethod for performing scaling processing on image data including aplurality of signals having different data rates.

2. Description of Related Art

In recent years, there is a need for a technique to convert an aspectratio of image data in the field of image processing. For example, imagedata which is included in television video data and distributed with anaspect ratio of 4:3 is converted into image data with an aspect ratio of16:9 or the like by performing scaling processing.

Japanese Unexamined Patent Application Publication No. 2003-189266discloses an image processing apparatus capable of performing acontinuous, more natural enlargement process on the entire displayscreen. The image processing apparatus disclosed in Japanese UnexaminedPatent Application Publication No. 2003-189266 includes a DDA (DigitalDifferential Analyzer) operation unit that allows a central portion of asingle image to be enlarged linearly and allows both end portionsthereof to be enlarged non-linearly, when video data having the aspectratio of 4:3 is enlarged in the horizontal direction for a video displayapparatus having the aspect ratio of 16:9. In particular, the imageprocessing apparatus disclosed in Japanese Unexamined Patent ApplicationPublication No. 2003-189266 controls each resampling point of a sourceimage with the use of the DDA operation unit so as to generate pixeldata of a destination image.

FIG. 10 is a block diagram showing the configuration of the imageprocessing apparatus disclosed in Japanese Unexamined Patent ApplicationPublication No. 2003-189266. An image conversion unit 90 included in animage processing apparatus 9 includes a memory unit 91, a resamplingunit 92, and a DDA operation unit 93. The memory unit 91 stores sourceimage data to be subjected to scaling processing. The DDA operation unit93 calculates the resampling point, which is a position at which thesource image data is acquired, based on the position of destinationimage data. In this case, the DDA operation unit 93 calculates theresampling point by linear function processing, quadric functionprocessing, and cubic function processing by using the previousresampling point and an increment thereof, and then outputs thecalculated resampling point to the memory unit 91 and the resamplingunit 92. The resampling unit 92 acquires image data corresponding to theresampling point, from the memory unit 91 to perform the scalingprocessing on the acquired image data, and then outputs the destinationimage data.

In this case, Delta represents an increment of a resampling point. Inthe linear scaling, Delta is a constant value and is also a reciprocalof an enlargement ratio. Further, an increment of Delta is defined asDelta2 and an increment of Delta2 is defined as Delta3, thereby enablingshifting of the resampling point in a cubic function manner.Furthermore, in order to achieve non-linear scaling in the both endportions, the area of the destination image is divided into three areas.Then, linear scaling is performed on the central portion by shifting theresampling point in a linear function manner, and non-linear scaling isperformed on the both end portions by shifting the resampling point in acubic function manner.

FIG. 11 is a flowchart showing processing for calculating the resamplingpoint according to Japanese Unexamined Patent Application PublicationNo. 2003-189266. First, the DDA operation unit 93 initializes parameters(S901). Herein, “DstWidth” represents a processing end position of thedestination image data. Additionally, “LinearStart” represents aposition of the destination image data at which the linear scaling isstarted, and “LinearEnd” represents a position of the destination imagedata at which the linear scaling is finished. “OutCount” represents acurrent position of the destination image data to be processed.

Next, the DDA operation unit 93 determines whether OutCount is less than“DstWidth” (S902). When determining that OutCount is equal to or greaterthan “DstWidth”, the DDA operation unit 93 finishes the processing. Whendetermining that OutCount is less than “DstWidth”, the DDA operationunit 93 adds Delta to “ResamplingPoint” (S903).

Then, the DDA operation unit 93 determines whether OutCount correspondsto the both end portions (S904). When determining that OutCountcorresponds to the both end portions, the DDA operation unit 93 addsDelta2 to Delta and also adds Delta3 to Delta2 (S905). When determiningthat OutCount does not correspond to the both end portions, that is,determining that OutCount corresponds to the central portion, the DDAoperation unit 93 determines whether OutCount is equal to “LinearStart”(S906). When determining that OutCount is equal to “LinearStart”, theDDA operation unit 93 inverts the sign of Delta2 (S907). Whendetermining that OutCount is other than “LinearStart”, the DDA operationunit 93 adds “1” to OutCount (S908) after the processing of Steps S905and S907. After that, the process returns to Step S902.

Assuming herein that the pixel number of the destination image isrepresented by x (x=0, 1, 2, . . . ) and the resampling point obtainedat the time is represented by f(x), d₁(x) serving as Delta in the pixelnumber x can be expressed by the following relational expression (1).d ₁(x)=f(x+1)−f(x)  (1)

Further, d₂(x) serving as Delta2 in the pixel number x can be expressedby the following relational expression (2).d ₂(x)=d ₁(x+1)−d ₁(x)  (2)

Furthermore, d₃(x) serving as Delta3 in the pixel number x can beexpressed by the following relational expression (3).d ₃(x)=d ₂(x+1)−d ₂(x)=constant   (3)

The relational expressions (1), (2), and (3) are given as shown in FIGS.12A to 12C. Herein, f(x) represents a cubic expression of x in anon-linear section, that is, a cubic processing section, and alsorepresents a linear expression of x in a linear section, that is, alinear processing section.

FIGS. 12A to 12C are graphs each showing changes in DDA operandscorresponding to output pixels in Japanese Unexamined Patent ApplicationPublication No. 2003-189266. FIG. 12A is a graph showing changes inresampling point. FIG. 12B is a graph showing changes in Delta. FIG. 12Cis a graph showing changes in Delta2.

Japanese Unexamined Patent Application Publication Nos. 2007-60105 and2007-74526 are disclosed as related art. Japanese Unexamined PatentApplication Publication No. 2007-60105 discloses an image dataconversion apparatus that converts source image data having an originalaspect ratio into data having an output aspect ratio. The image dataconversion apparatus disclosed in Japanese Unexamined Patent ApplicationPublication No. 2007-60105 includes parameter generation means forvarying parameters for conversion according to the output aspect ratio.

Japanese Unexamined Patent Application Publication No. 2007-74526discloses an image processing apparatus to solve a problem of a loss ofa color-difference signal, upon combining a plurality of image dataitems given by a component signal including a luminance signal and twocolor-difference signals at a data rate of 4:2:2. The image processingapparatus disclosed in Japanese Unexamined Patent ApplicationPublication No. 2007-74526 converts the component signal having the datarate of 4:2:2 into a component signal having a data rate of 4:4:4, andgenerates a composite video signal so that an image is displayed bygiving priority to a component signal of an image of a higher priorityin accordance with a predetermined priority order.

SUMMARY

The present inventor has found a problem that, when the technologydisclosed in Japanese Unexamined Patent Application Publication No.2003-189266 is applied to image data that includes multiple types ofsignals including a luminance signal and color-difference signals withdifferent data rates, a deviation occurs between signals of the imagedata after scaling processing.

For example, YCbCr 4:2:2 format is used as a standard format for videodata including a luminance signal represented by Y data and twocolor-difference signals represented by Cb and Cr data (hereinafter,collectively referred to as “C data”) at a data rate of 4:2:2. To applythe technology disclosed in Japanese Unexamined Patent ApplicationPublication No. 2003-189266 to image data in the YCbCr 4:2:2 format, itis necessary to perform scaling processing separately and independentlyfor each type of signals, and then perform processing for combiningimage data after the scaling processing.

FIG. 13 is a block diagram showing a configuration example of anapparatus for performing scaling processing by applying the technologydisclosed in Japanese Unexamined Patent Application Publication No.2003-189266 to the image data in the YCbCr 4:2:2 format. An imageprocessing apparatus 9 a shown in FIG. 13 is a modified example of theimage processing apparatus 9 disclosed in Japanese Unexamined PatentApplication Publication No. 2003-189266, and includes an imageconversion unit 90 a and an image conversion unit 90 b. The imageconversion unit 90 a receives an input of Y data 71, which is includedin source image data 7, to perform scaling processing on the receiveddata, and outputs Y data 81 as destination image data 8. Further, theimage conversion unit 90 b receives an input of C data 72, which isincluded in the source image data 7, to perform scaling processing onthe received data, and outputs C data 82 as the destination image data8.

After that, the Y data 81 is combined with the C data 82 to generate thedestination image data 8. The results thus obtained are shown in FIG. 14as a schematic diagram. It is assumed in FIG. 14 that the source imagedata 7 includes a colored area 710 and a colored area 720. The coloredarea 710 and the colored area 720 are represented by Y data and C data,respectively. Further, the destination image data 8, which is dataobtained after the scaling processing performed by the image processingapparatus 9 a, includes a colored area 810 and a colored area 820. Notethat the colored area 810 includes color shift areas 811 which areprovided at both ends thereof and in which a significant signaldeviation occurs. Further, the colored area 820 includes a color shiftarea 821 and a color shift area 822 which are provided at both endsthereof.

The above-mentioned results are obtained because the resampling positionof the C data corresponding to the Y data is not properly set at atiming of switching the order of the DDA operation. The timing ofswitching the order of the DDA operation refers to, for example, atiming when a function for performing the DDA operation is switched froma cubic function to a linear function. For example, upon switching fromthe linear scaling to the non-linear scaling, the results of the DDAoperation with the linear function are used as input data for the DDAoperation with the cubic function. Meanwhile, the C data has a data rateless than that of the Y data (½), and thus the data positions serving asinputs do not correspond to each other. As a result, a color shiftoccurs when the scaling processing is carried out.

Further, the technology disclosed in Japanese Unexamined PatentApplication Publication No. 2007-60105 is capable of selecting oradjusting parameters for conversion according to an aspect ratio of aconversion destination. In the technology, however, an image format forexpressing a single image information item using multiple types ofsignals having different rates is not considered, and therefore such animage format cannot be handled.

Meanwhile, the technology disclosed in Japanese Unexamined PatentApplication Publication No. 2007-74526 processes an image format such asthe YCbCr 4:2:2 format, but the processing is carried out after the Cdata portion is doubled in advance. As a result, the amount of the Cdata is twice as large as the source data, and a large number ofmemories are required, which leads to an increase in circuit size.

A first exemplary aspect of an embodiment of the present invention is animage processing apparatus that performs scaling processing on imagedata including a plurality of signals having different data rates,including: a first scaling processing unit that performs a first scalingprocessing according to a first scale factor in a first area; and asecond scaling processing unit that performs a second scaling processingsubsequent to the first scaling processing, according to a second scalefactor in a second area adjacent to the first area. The second scalingprocessing unit performs the second scaling processing on a signalhaving a high data rate with use of the first scale factor, upon startof the second scaling processing, and performs the second scalingprocessing on a signal having a low data rate with use of the secondscale factor obtained by correcting the first scale factor.

A second exemplary aspect of an embodiment of the present invention isan image processing method that performs scaling processing on imagedata including a plurality of signals having different data rates, theimage processing method including: a first scaling processing step ofperforming a first scaling processing according to a first scale factorin a first area; and a second scaling processing step of performing asecond scaling processing subsequent to the first scaling processing,according to a second scale factor in a second area adjacent to thefirst area. The second scaling processing step includes performing thesecond scaling processing on a signal having a high data rate with useof the first scale factor, upon start of the second scaling processing,and performing the second scaling processing on a signal having a lowdata rate with use of the second scale factor obtained by correcting thefirst scale factor.

According to the image processing apparatus and method of exemplaryaspects of the present invention, the second scaling processing unitperforms the second scaling processing on the signal having a low datarate according to the second scale factor which is obtained bycorrecting the first scale factor, unlike in the case of the signalhaving a high data rate, thereby enabling adjustment of the results ofthe second scaling processing. Consequently, a deviation between asignal having a high data rate and a signal having a low data rate,which is caused as a result of the scaling processing, can beeliminated.

According to an exemplary embodiment of the present invention, it ispossible to eliminate a signal deviation that occurs when scalingprocessing is performed on image data including a plurality of signalshaving different data rates.

BRIEF DESCRIPTION OF THE DRAWINGS

The above and other exemplary aspects, advantages and features will bemore apparent from the following description of certain exemplaryembodiments taken in conjunction with the accompanying drawings, inwhich:

FIG. 1 is a block diagram showing the configuration of an imageprocessing apparatus according to a first exemplary embodiment of thepresent invention;

FIG. 2 is a block diagram showing the configuration of an imageprocessing apparatus according to a first example of the presentinvention;

FIG. 3 is a block diagram showing the configuration of an imageconversion correction unit according to the first example of the presentinvention;

FIG. 4 is a flowchart showing processing for calculating resamplingpoints according to the first example of the present invention;

FIG. 5 is a diagram showing an algorithm and changes in values uponswitching from cubic processing to linear processing in the firstexample of the present invention;

FIG. 6 is a schematic diagram showing an outline of the results ofscaling processing for image data in the first example of the presentinvention;

FIG. 7 is a diagram showing an algorithm and changes in values uponswitching from quadratic processing to cubic processing in a secondexample of the present invention;

FIG. 8 is a diagram showing an algorithm and changes in values uponswitching from quadratic processing to linear processing in a thirdexample of the present invention;

FIG. 9 is a table showing correction values at the time when linearprocessing, quadratic processing, and cubic processing are mutuallyswitched according to an exemplary embodiment of the present invention;

FIG. 10 is a block diagram showing the configuration of an imageprocessing apparatus of the related art;

FIG. 11 is a flowchart showing processing for calculating resamplingpoints of the related art;

FIG. 12A is a graph showing changes in resampling points serving as DDAoperands corresponding to output pixels in the related art;

FIG. 12B is a graph showing changes in Delta serving as DDA operandscorresponding to output pixels in the related art;

FIG. 12C is a graph showing changes in Delta2 serving as DDA operandscorresponding to output pixels in the related art;

FIG. 13 is a block diagram showing a configuration example of anapparatus for performing scaling processing on image data in YCbCr 4:2:2format by applying the related art;

FIG. 14 is a schematic diagram showing an outline of the results ofscaling processing for image data in the related art; and

FIG. 15 is a diagram showing an algorithm and changes in values uponswitching from cubic processing to linear processing in the related art.

DETAILED DESCRIPTION OF THE EXEMPLARY EMBODIMENTS

Specific exemplary embodiments to which the present invention is appliedwill be described in detail below with reference to the drawings. Theidentical components are denoted by the same reference symbolsthroughout the drawings, and the redundant explanation thereof isomitted as appropriate for clarification of the explanation.

First, the cause of the problem inherent in Japanese Unexamined PatentApplication Publication No. 2003-189266 is analyzed to make clear thereason why the present inventor has conceived the present invention.

First of all, in the YCbCr 4:2:2 format of image data in which theproblem occurs, the data amount in the horizontal direction of Y datarepresenting a luminance signal differs from that of C data representinga color-difference signal. In this regard, the following two definitionsare provided for the purpose of explanation. The Y data corresponding ton-th data of the C data is defined as 2n-th data of the Y data(Definition 1). A resampling point of the Y data corresponding to ann-th resampling point of the C data is defined as a 2n-th resamplingpoint of the Y data (Definition 2). Note that the resampling point ofthe C data is a position (point) of the C data with respect to thesource image data. Further, the number of resampling points correspondsto the data amount of a destination image. The destination image is alsogenerated in the YCbCr 4:2:2 format, and therefore the resampling pointof the destination image is defined in a similar manner as Definition 1.

Further, the following definition is made based on Definitions 1 and 2.When the resampling point of the C data corresponds to ½ of theresampling point of the Y data, “the resampling position of the Y datamatches the resampling position of the C data” (Definition 3).

It is assumed herein that, regarding the Y data, an initial value ofDelta is represented by “α”; an initial value of Delta2 is representedby “β”; Delta3 is represented by “γ”; and an initial value of aresampling point is represented by “I”. It is also assumed that Delta3is a constant value. Based on recurrence formulae for the relationalexpressions (1) to (3) and Definitions 1 and 2, a resampling point fy(x)of the Y data can be expressed by the following relational expression(4).

$\begin{matrix}{{f_{y}(x)} = {{\frac{1}{6}\gamma\; x^{2}} + {\frac{1}{2}\left( {\beta - \gamma} \right)x^{2}} + {\frac{1}{6}\left( {{6\alpha} - {3\beta} + {2\gamma}} \right)x} + {I\left( {0 \leq x < {{Dst} \cdot {Width}}} \right)}}} & (4)\end{matrix}$

Further, a resampling point fc(x) of the C data can be expressed by thefollowing relational expression (5).

$\begin{matrix}{{f_{c}(x)} = {{\frac{2}{3}\gamma\; x^{3}} + {\left( {\beta - \gamma} \right)x^{2}} + {\frac{1}{6}\left( {{6\alpha} - {3\beta} + {2\gamma}} \right)x} + {\frac{1}{2}{I\left( {0 \leq x < {{Dst} \cdot {{Width}/2}}} \right)}}}} & (5)\end{matrix}$

Furthermore, Delta, Delta2, and Delta3, which are increments of theresampling point, can be derived from the relational expressions (1) to(5). Additionally, d1y(x) that represents Delta of the Y data can beexpressed by a relational expression (6); d2y(x) that represents Delta2of the Y data can be expressed by a relational expression (7); andd3y(x) that represents Delta3 of the Y data can be expressed by arelational expression (8).

$\begin{matrix}{{d\; 1_{y}(x)} = {{\frac{1}{2}\gamma\; x^{2}} + {\frac{1}{2}\left( {{2\beta} - \gamma} \right)x} + \alpha}} & (6) \\{{d\; 2_{y}(x)} = {{\gamma\; x} + \beta}} & (7) \\{{d\; 3_{y}(x)} = \gamma} & (8)\end{matrix}$

Further, d1c(x) that represents Delta of the C data can be expressed bya relational expression (9); d2c(x) that represents Delta2 of the C datacan be expressed by a relational expression (10); and d3x(x) thatrepresents Delta3 of the C data can be expressed by a relationalexpression (11).

$\begin{matrix}{{d\; 1_{c}(x)} = {{2\gamma\; x^{2}} + {2\beta\; x} + \alpha + \frac{\beta}{2}}} & (9) \\{{d\; 2_{c}(x)} = {{4\gamma\; x} + {2\beta} + {2\gamma}}} & (10) \\{{d\; 3_{C}(x)} = {4\gamma}} & (11)\end{matrix}$

Then, when the number of resampling points of the C data is representedby “n”, the DDA operand of the resampling point of the corresponding Ydata is compared with the DDA operand of the resampling point of the Cdata. The DDA operands of the Y data can be expressed by the followingrelational expressions (12) to (15).

$\begin{matrix}{{f_{y}\left( {2n} \right)} = {{\frac{4}{3}\gamma\; n^{3}} + {2\left( {\beta - \gamma} \right)n^{2}} + {\frac{1}{3}\left( {{6\alpha} - {3\beta} + {2\gamma}} \right)n} + I}} & (12) \\{{d\; 1_{y}\left( {2n} \right)} = {{2\gamma\; n^{2}} + {\left( {{2\beta} - \gamma} \right)n} + \alpha}} & (13) \\{{d\; 2_{y}\left( {2n} \right)} = {{2\gamma\; n} + \beta}} & (14) \\{{d\; 3_{y}\left( {2n} \right)} = \gamma} & (15)\end{matrix}$

Further, the DDA operands of the C data can be expressed by thefollowing relational expressions (16) to (19).

$\begin{matrix}{{f_{c}(n)} = {{\frac{2}{3}\gamma\; n^{3}} + {\left( {\beta - \gamma} \right)n^{2}} + {\frac{1}{6}\left( {{6\alpha} - {3\beta} + {2\gamma}} \right)n} + {\frac{1}{2}I}}} & (16) \\{{d\; 1_{c}(n)} = {{2\gamma\; n^{2}} + {2{\beta n}} + \alpha + \frac{\beta}{2}}} & (17) \\{{d\; 2_{c}(n)} = {{4\gamma\; n} + {2\beta} + {2\gamma}}} & (18) \\{{d\; 3_{C}(n)} = {4\gamma}} & (19)\end{matrix}$

Herein, the relational expressions (12) and (16) satisfy therelationship of the following relational expression (20). Accordingly,it can be said that the resampling positions of the Y data and C dataare always the same.

$\begin{matrix}{{f_{c}(n)} = {\frac{1}{2}{f_{y}\left( {2n} \right)}\mspace{14mu}\left( {0 \leq n < {{{Dst}.\mspace{11mu}{Width}}/2}} \right)}} & (20)\end{matrix}$

Additionally, the relational expressions for Delta, Delta2, and Delta3can be expressed by the following relational expressions (21), (22), and(23). Note that the derivation of the following relational expressionscan be proved by induction, but the proof is omitted herein.

$\begin{matrix}{{d\; 1_{c}(n)} = {{d\; 1_{y}\left( {2n} \right)} + {\frac{1}{2}d\; 2_{y}\left( {2n} \right)}}} & (21) \\{{d\; 2_{c}(n)} = {{{2 \cdot d}\; 2_{y}\left( {2n} \right)} + {2\gamma}}} & (22) \\{{d\; 3_{c}(n)} = {4\gamma}} & (23)\end{matrix}$

The relational expressions (4) to (23) can be applied as quadricfunction processing assuming γ=0, and can also be applied as linearfunction processing assuming β=0 and γ=0.

In this case, the DDA operands used during quadric function processingare validated by actually substituting the operands into the relationalexpressions (12) to (14) and the relational expressions (16) to (18),assuming γ=0. It is assumed herein that I₂, α₂, and β₂ are values of theresampling point, Delta, and Delta2, respectively, upon start of thequadratic processing. The DDA operands of the Y data used during quadricfunction processing can be expressed by the following relationalexpressions (24) to (26).f _(y)(2n)=2β₂ n ²+(2α₂−β₂)n+I ₂  (24)d1_(y)(2n)=2β₂ n+α ₂  (25)d2_(y)(2n)=β₂  (26)

Further, the DDA operands of the C data used during quadric functionprocessing can be expressed by the following relational expressions (27)to (29).

$\begin{matrix}{{f_{c}(n)} = {{\beta_{2}n^{2}} + {\frac{1}{2}\left( {{2\alpha_{2}} - \beta_{2}} \right)n} + {\frac{1}{2}I_{2}}}} & (27) \\{{d\; 1_{c}(n)} = {{2\beta_{2}n} + \alpha_{2} + \frac{\beta_{2}}{2}}} & (28) \\{{d\; 2_{c}(n)} = {2\beta_{2}}} & (29)\end{matrix}$

When relational expressions for the Y data and C data are derived fromthe above expressions, the relational expressions for the Y data and Cdata used during quadratic processing can be expressed by the followingrelational expressions (30) to (32).

$\begin{matrix}{{f_{c}(n)} = {\frac{1}{2}{f_{y}\left( {2n} \right)}}} & (30) \\{{d\; 1_{c}(n)} = {{{d\; 1_{y}\left( {2n} \right)} + {\frac{1}{2}d\; 2_{y}\left( {2n} \right)}} = {{d\; 1_{y}\left( {2n} \right)} + \frac{\beta_{2}}{2}}}} & (31) \\{{d\; 2_{c}(n)} = {{{2 \cdot d}\; 2_{y}(n)} = {2\beta_{2}}}} & (32)\end{matrix}$

From the relational expression (30), it can be said that the resamplingpositions of the Y data and C data are always the same.

Additionally, the DDA operands used during linear function processingare validated assuming β=0 and γ=0. It is assumed herein that I₁ and α₁are values of the resampling point and Delta, respectively, at the timeof starting the linear processing. The DDA operands of the Y data usedduring linear function processing can be expressed by the followingrelational expressions (33) and (34).f _(y)(2n)=2α₁ n+I ₁  (33)d1_(y)(2n)=α₁  (34)

Further, the DDA operands of the C data used during linear functionprocessing can be expressed by the following relational expressions (35)and (36).

$\begin{matrix}{{f_{c}(n)} = {{\alpha_{1}n} + {\frac{1}{2}I_{1}}}} & (35) \\{{d\; 1_{c}(n)} = \alpha_{1}} & (36)\end{matrix}$

When relational expressions for the Y data and C data are derived fromthe above expressions, the relational expressions for the Y data and Ddata used during linear processing can be expressed by the followingrelational expressions (37) and (38).

$\begin{matrix}{{f_{c}(n)} = {\frac{1}{2}{f_{y}\left( {2n} \right)}}} & (37) \\{{d\; 1_{c}(n)} = {{d\; 1_{y}\left( {2n} \right)} = \alpha_{1}}} & (38)\end{matrix}$

From the relational expression (37), it can be said that the resamplingpositions of the Y data and C data are always the same.

In view of the foregoing, the above-mentioned problem that occurs inJapanese Unexamined Patent Application Publication No. 2003-189266 isexemplified. FIG. 15 is a diagram showing an algorithm and changes invalues upon switching from the cubic processing to the linear processingin Japanese Unexamined Patent Application Publication No. 2003-189266.In FIG. 15, “Dst. Data No.” of each of the Y data and C data representsthe position of the destination image data, that is, the number ofresampling points. Additionally, “LS” of “Dst. Data No.” represents thenumber of resampling points at the time of starting the linearprocessing for the Y data. FIG. 15 shows a case where the DDA processingis carried out when “Dst. Data No.” is in a range from “LS−2” to “LS+2”.Though FIG. 15 shows that the Y data and C data are arranged side byside for ease of comparison, the Y data and C data may be processedindependently of each other.

Herein, “Dst. Data No.” defines the DDA operand of the C data with theDDA operand in “LS−2”, which is two steps before “LS” with respect tothe Y data, as a reference. In other words, the DDA operands of the Cdata can be calculated by the relational expressions (20) to (23).

Specifically, when “Dst. Data No.” of the Y data indicates “LS−2” inStep S151 of FIG. 15, the resampling point is defined as “f”; Delta isdefined as “a”; Delta2 is defined as “b”; and Delta3 is defined as “c”.Further, when “Dst. Data No.” of the C data indicates “LS/2−1”, theresampling point is defined as “f/2”; Delta is defined as “a+b/2”;Delta2 is defined as “2b+2c”; and Delta3 is defined as “4c”.

The processing flow is described below. First, in Step S151, “Dst. DataNo.” of the Y data indicates “LS−2”, and the DDA operation unit 93 addsDelta to the resampling point by the processing corresponding to StepS903 of FIG. 11. Further, since “LS−2” corresponds to the cubicprocessing section, the DDA operation unit 93 determines “YES” in StepS904 of FIG. 11, and adds Delta2 to Delta and also adds Delta3 to Delta2by the processing corresponding to Step S905 of FIG. 11. Furthermore,“Dst. Data No.” of the C data indicates “LS/2−1”, and the DDA operationunit 93 performs addition of the resampling point, Delta, and Delta2 ina similar manner as in the Y data. Note that Delta3 of each of the Ydata and C data is constant.

Next, in Step S152, “Dst. Data No.” of the Y data indicates “LS−1”, andthe DDA operation unit 93 performs addition of the resampling point,Delta, and Delta2 in a similar manner as in Step S151. Since C datacorresponding to Y data does not exist in this case, processing for theC data is not carried out. At this time, the DDA operation unit 93performs cubic processing for the Y data and C data, and uses theresults of the cubic processing as input values for the subsequent step.

Then, in Step S153, “Dst. Data No.” of the Y data indicates “LS”, andthe DDA operation unit 93 adds Delta to the resampling point by theprocessing corresponding to Step S903 of FIG. 11. Further, since “LS”corresponds to the linear processing section, the DDA operation unit 93determines “NO” in Step S904 of FIG. 11, and does not perform additionof Delta and Delta2. Furthermore, “Dst. Data No.” of the C dataindicates “LS/2”, and the DDA operation unit 93 performs addition of theresampling point in a similar manner as in the Y data. Note that Deltaof each of the Y data and C data is constant.

After that, in Step S154, “Dst. Data No.” of the Y data indicates“LS+1”, and the DDA operation unit 93 performs addition of theresampling point in a similar manner as in Step S153. Since C datacorresponding to Y data does not exist in this case, processing for theC data is not carried out. Also in the steps subsequent to Step S155,Steps S153 and S154 are repeatedly executed.

Herein, the resampling point of the Y data is compared with theresampling point of the C data used during starting the processing ofStep S155. The resampling point of the Y data is represented byf+4a+5b+2c. Further, the resampling point of the C data is representedby f/2+2a+3b+2c. Accordingly, fc(n)=1/2fy(2n) of the relationalexpression (20) is not satisfied, and therefore it can be said that theresampling positions are not the same. That is, in the destinationimage, the C data representing color difference information does notcorrespond to the Y data representing luminance information, whichcauses a color shift. In other words, this indicates that a significantsignal deviation occurs, and also indicates that the color shiftincreases if the processing subsequent to Step S155 is continued.

Further, in Step S153, no color shift occurs, and it is obvious that thecolor shift first occurs in Step S155. In other words, this indicatesthat the value of Delta for use in calculating the resampling point,which is the input value in Step S155, is not correct. The sentence “thevalue of Delta is not correct” means that the relational expressionswhich should be satisfied by the Y data and C data are not satisfied.Specifically, Delta needs to satisfy the relational expression (38) whenthe linear processing is carried out, while Delta does not satisfy therelational expression (38) when “Dst. Data No.” indicates “LS” orsubsequent numbers.

In view of the foregoing, it can be said that the color shift occursbecause each DDA operand at the boundary where the order of theprocessing is switched has two sides: a value obtained as a result ofprocessing of the previous operation; and a value serving as an operandfor the subsequent processing. Accordingly, immediately before the orderof the processing of the DDA operation is switched, the relationalexpressions for the Y data and C data, which should be satisfied by theorder of the previous procession, are satisfied as the operation resultof the previous processing. Meanwhile, immediately after the order ofthe processing is switched, the relational expressions for the Y dataand C data, which should be satisfied by Delta, are not satisfied.

Specifically, in the case of FIG. 15, the operation results of StepsS151 and S152 show that the DDA operands of the Y data and C datasatisfy all the relational expressions (20) to (23) as a result of thecubic processing, and are used as input values in Step S153. Meanwhile,the operands serving as the input values in Step S155 do not satisfy allthe relational expressions (37) and (38) that should be satisfied. Thiscauses the color shift after the linear processing, and the color shiftgradually increases due to the accumulation of the color shift. For thisreason, the present inventor has conceived the present invention tocorrect operands at a boundary where the order of processing is switchedas described below.

[First Exemplary Embodiment]

FIG. 1 is a block diagram showing the configuration of an imageprocessing apparatus 10 according to a first exemplary embodiment of thepresent invention. The image processing apparatus 10 receives sourceimage data 2 to perform scaling processing including enlargement andreduction processing according to a predetermined scale factor with theuse of a first scaling processing unit 101 and a second scalingprocessing unit 102, and outputs destination image data 3.

In this case, the source image data 2 includes a first area 21 and asecond area 22 which is adjacent to the first area 21. The first area 21includes Y data 211 and C data 212 which are a plurality of differentsignals. Herein, the Y data 211 has a data rate greater than that of theC data 212. The second area 22 includes Y data 221 and C data 222 whichare a plurality of different signals. The data rates of the Y data 221and the C data 222 are equal to the data rates of the Y data 211 and theC data 212.

Further, the destination image data 3 includes a first area 31 and asecond area 32 which correspond to the first area 21 and the second area22, respectively. The first area 31 includes Y data 311 and C data 312which correspond to the Y data 211 and the C data 212, respectively, andhave data rates similar to the data rates of the Y data 211 and C data212. The second area 32 includes Y data 321 and C data 322 whichcorrespond to the Y data 221 and the C data 222, respectively, and havedata rates similar to the data rates of the Y data 221 and C data 222.

The first scaling processing unit 101 processes the Y data 211 and Cdata 212 that are included in the first area 21. The first scalingprocessing unit 101 performs scaling processing on the Y data 211according to a first scale factor, and generates and outputs the Y data311. Further, the first scaling processing unit 101 performs scalingprocessing also on the C data 212 according to the first scale factor,and generates and outputs the C data 312. Then, the first scalingprocessing unit 101 corrects the first scale factor, and outputs thefirst scale factor and the corrected first scale factor to the secondscaling processing unit 102.

The second scaling processing unit 102 processes the Y data 221 and Cdata 222 which are processed after the processing performed by the firstscaling processing unit 101 and are included in the second area 22. Thesecond scaling processing unit 102 calculates a second scale factor forthe Y data 221 with the use of the first scale factor, and performsscaling processing on the Y data 221 according to the second scalefactor. Thus, the scaling processing unit 102 generates and outputs theY data 321. Further, the second scaling processing unit 102 calculatesthe corrected second scale factor for the C data 222 with the use of thecorrected first scale factor, and performs scaling processing on the Cdata 222 according to the corrected second scale factor. Thus, thesecond scaling processing unit 102 generates and outputs the C data 322.

Note that the second scaling processing unit 102 may correct the firstscale factor immediately before or simultaneously with the scalingprocessing.

Alternatively, the resampling point of the source image data 2 may becalculated by the above-mentioned scaling processing.

According to the first exemplary embodiment of the present invention, inthe image data including a plurality of signals having different datarates, such as the Y data 211, Y data 221, C data 212, and C data 222included in the source image data 2, the use of the corrected secondscale factor for the C data 22, which is included in the second area 22and has a low data rate, enables the scaling processing different fromthat for the C data 212 included in the first area 21. As a result, acolor shift that occurs when the scaling processing is carried out, thatis, a signal deviation can be eliminated.

In other words, the first scaling processing unit according to the firstexemplary embodiment of the present invention calculates the secondscale factor for a signal having a low data rate by correcting the firstscale factor so that the second scale factor becomes a value obtained byperforming the second scaling processing on the first scale factor.

Note that the image data in which the above-mentioned problem occursincludes a plurality of signals having different data rates.Specifically, a signal having a high data rate may be a luminancesignal, and a signal having a low data rate may be a color-differencesignal indicating the difference in color from the luminance signal.More specifically, the luminance signal may be the Y data, and thecolor-difference signal may be the C data represented by “Cb” and “Cr”.In other words, in the YCbCr 4:2:2 format, the data amount in thehorizontal direction of the Y data is different from that of the C data.Note that image formats used in exemplary embodiments of the presentinvention are not limited to the YCbCr 4:2:2 format.

EXAMPLE 1

As a first example of the image processing apparatus 10 according to thefirst exemplary embodiment of the present invention, an image processingapparatus 10 a that performs scaling processing on image data in theYCbCr 4:2:2 format will be described below by way of example. In thefirst example, a description is given of a case where the DDA operand iscorrected when the scaling processing is switched from the cubicprocessing to the linear processing.

FIG. 2 is a block diagram showing the configuration of the imageprocessing apparatus 10 a according to the first example of the presentinvention. The image processing apparatus 10 a is a modified example ofthe image processing apparatus 10, and includes an image conversion unit11 and an image conversion correction unit 12. The image conversion unit11 receives an input of Y data 201, which is included in the sourceimage data 2, to perform scaling processing on the Y data 201, andoutputs Y data 301 as the destination image data 3. Note that the imageconversion unit 90 a described above may be applied to the imageconversion unit 11. Additionally, the image conversion correction unit12 receives an input of C data 202, which is included in the sourceimage data 2, to perform scaling processing on the C data 202, andoutputs C data 302 as the destination image data 3. In this case, theimage conversion correction unit 12 performs scaling processing on the Cdata included in an area specified in advance, by applying the correctedscale factor, unlike in the case of the Y data included in thecorresponding area.

FIG. 3 is a block diagram showing the configuration of the imageconversion correction unit 12 according to the first example of thepresent invention. The image conversion correction unit 12 includes amemory unit 121, a resampling unit 122, and a DDA operation unit 123.The memory unit 121 receives an input of the C data, which is the sourceimage data to be subjected to scaling processing, and stores the data.The memory unit 121 may be a memory such as a RAM (Random AccessMemory), a ROM (Read Only Memory), or a non-volatile memory. Theresampling unit 122 obtains, from the memory unit 121, image datacorresponding to the resampling point received from the DDA operationunit 123 to perform scaling processing on the obtained image data to fitthe area of the predetermined destination image data, and then outputsthe destination image data. Note that the memory unit 121 and theresampling unit 122 may be similar to the memory unit 91 and theresampling unit 92 shown in FIG. 10.

The DDA operation unit 123 includes a DDA operand correction unit 124 inaddition to the function of the DDA operation unit 93 shown in FIG. 10.The DDA operand correction unit 124 corrects Delta, Delta2, and Delta3,which are the DDA operands, immediately before the switching of theorder of the linear function, quadric function, and cubic functionoperation processing. Thus, the DDA operation unit 123 can calculate theresampling point using the corrected DDA operands after the switching ofthe order.

FIG. 4 is a flowchart showing processing for calculating resamplingpoints in the image conversion correction unit 12 according to the firstexample of the present invention. Note that Steps S101 to S107 and StepS110 of FIG. 4 are similar to Steps S901 to S908 of FIG. 11.Accordingly, a detailed description thereof is omitted and thedifference from the processing shown in FIG. 11 is mainly describedbelow.

The DDA operation unit 123 determines whether the processing is switchedor not in Step S108. Specifically, the DDA operation unit 123 determineswhether OutCount is a predetermined value indicating that the processingis switched. For example, the value corresponds to a position of thedestination image obtained when the processing is switched from thecubic processing corresponding to the non-linear scaling to the linearprocessing corresponding to the linear scaling.

When determining that the processing is switched, the DDA operandcorrection unit 124 corrects the DDA operand (S109). In this case, theDDA operation unit 123 outputs Delta, Delta2, and Delta3, which are theDDA operands, to the DDA operand correction unit 124. Then, the DDAoperand correction unit 124 adds a preset correction value to the DDAoperand in accordance with the switching of the processing among Delta,Delta2, and Delta3, thereby calculating the corrected DDA operand. Forexample, upon switching from the cubic processing to the linearprocessing, the DDA operand correction unit 124 adds a correction valueof Delta to Delta. Then, the value of the corrected Delta is output tothe DDA operation unit 123. As a result, the DDA operation unit 123 canuse the value of the corrected Delta to calculate the subsequentresampling point.

In other words, the DDA operand correction unit 124 adds a correctionvalue to the DDA operand of the C data, at a point at which the order ofthe DDA operation processing is switched, for example, at a point atwhich the processing is switched from the cubic processing to the linearprocessing, so that the resampling position of the Y data is preventedfrom deviating from the resampling position of the C data in the DDAoperation prior to the switching of the order.

As a specific example, when the processing is switched from the cubicprocessing to the linear processing, the correction value can beobtained as described below by comparison between the relationalexpressions (20) and (21) and the relational expressions (37) and (38).

A comparison between the relational expressions (21) and (38) of Deltashows that Delta of the C data is greater by ½d2y(2n). However, in orderto process the Y data and C data independently of each other, therelational expressions are not used as they are. Instead, the Y data andthe C data are processed independently of each other by using thetransformation of the following expressions. The following relationalexpression (39) is derived from the relational expression (22).

$\begin{matrix}{{d\; 2_{y}\left( {2n} \right)} = {{\frac{1}{2}d\; 2_{c}(n)} - \gamma}} & (39)\end{matrix}$

Additionally, the following relational expression (40) is derived fromthe relational expression (3).d2_(c)(n)=d2_(c)(n−1)+d3_(c)(n−1)=d2_(c)(n−1)+4γ  (40)

Then, the relational expression (40) is substituted into the relationalexpression (39), thereby obtaining the following relational expression(41).

$\begin{matrix}{{d\; 2_{y}\left( {2n} \right)} = {{\frac{1}{2}d\; 2_{c}\left( {n - 1} \right)} + \gamma}} & (41)\end{matrix}$

Accordingly, the correction value of Delta can be expressed as acorrection value (42).

$\begin{matrix}{{{- \frac{1}{2}}d\; 2_{y}\left( {2n} \right)} = {{{- \frac{1}{4}}d\; 2_{c}\left( {n - 1} \right)} - {\frac{1}{2}\gamma}}} & (42)\end{matrix}$

Since the correction value can be expressed by only the DDA operand ofthe C data and the constant, it can be said that the Y data and C datacan be processed independently of each other.

Consequently, when the processing is switched from the cubic processingto the linear processing, the DDA operand correction unit 124 adds thecorrection value (42) to Delta, thereby enabling correction of Delta.

As described above, according to an exemplary embodiment of the presentinvention, the correction value can be calculated based on a differencebetween the relational expressions. The DDA operand correction unit 124adds an appropriate correction value to the DDA operand at a timing whenthe processing is switched, thereby enabling the non-linear scalingwhich prevents the resampling positions from deviating from each otherin the YCbCr 4:2:2 format.

Next, a specific correction value is calculated using the correctionvalue (42) upon switching from the cubic processing to the linearprocessing. In this case, assuming n=LS/2 and γ=c, the correction valuecan be calculated as a correction value (43).

$\begin{matrix}\begin{matrix}{{{{- \frac{1}{4}}d\; 2_{c}\left( {{{LS}/2} - 1} \right)} - {\frac{1}{2}\gamma}} = {{{- \frac{1}{4}}\left( {{2b} + {2c}} \right)} - {\frac{1}{2}c}}} \\{= {{{- \frac{1}{2}}b} - c}} \\{= {{{- 0.5}b} - c}}\end{matrix} & (43)\end{matrix}$

FIG. 5 is a diagram showing an algorithm and changes in values uponswitching from the cubic processing to the linear processing in thefirst example of the present invention. FIG. 5 shows the case where theDDA processing is performed when the “Dst. Data No.” is in the rangefrom “LS−2” to “LS+2”, in a similar manner as in FIG. 15. Further, the Ydata is processed by the image conversion unit 11, and the C data isprocessed by the image conversion correction unit 12. Note that StepsS51 to S55 for the Y data shown in FIG. 5 are similar to Steps S151 toS155 of FIG. 15. Accordingly, the detailed description thereof isomitted and only the difference from the processing shown in FIG. 15,that is, the process for the C data is mainly described below.

First, in Step S51, “Dst. Data No.” of the C data indicates “LS/201”,and the DDA operation unit 123 performs addition of the resamplingpoint, Delta, and Delta2, by the processing corresponding to Steps S103and S105 of FIG. 4. Additionally, in Step S108, the DDA operation unit123 determines that “LS/2−1” is the last “Dst. Data No.” of the cubicprocessing on the C data and that the order is ready to be switched.Then, in Step S109 of FIG. 4, the DDA operand correction unit 124 addsthe correction value (43) to Delta. Specifically, Delta serving as aninput value of the C data when “Dst. Data No.” shown in FIG. 5 indicates“LS/2” is represented by a+2b+c.

Next, in Step S53, “Dst. Data No.” of the C data indicates “LS/2”, andthe DDA operation unit 123 adds Delta, which is corrected in Step S51,to the resampling point, by the processing corresponding to Step S103 ofFIG. 4. Further, since “LS/2” corresponds to the linear processingsection, the DDA operation unit 123 determines “NO” in Step S104 of FIG.4, and does not perform addition of Delta and Delta2.

In this manner, Delta of the C data is corrected at a boundary betweenthe cubic processing and the linear processing, thereby satisfying therelational expressions (37) and (38) for the Y data and C data also inStep S55. In other words, when the correction is performed in thismanner, the color shift can be eliminated as shown in FIG. 6.

FIG. 6 is schematic diagram showing an outline of the results of thescaling processing for image data in the first example of the presentinvention. It is assumed in FIG. 6 that the source image data 2 includesa colored area 210 and a colored area 220, and the colored area 210 andthe colored area 220 are represented by Y data and C data, respectively.Further, the destination image data 3, which is data obtained after thescaling processing performed by the image processing apparatus 10 a,includes a colored area 310 and a colored area 320. In this case, unlikein the colored area 810 and the colored area 820 of FIG. 14, no colorshift occurs in the colored area 310 and the colored area 320.

According to the first example of the present invention, it is possibleto eliminate the color shift that occurs upon switching between thenon-linear scaling processing and the linear scaling processing.

In other words, the DDA operand correction unit 124 described abovecorrects the C data, which is a signal having a low data rate, based ona difference between the relational expression (21) for calculating avalue based on Delta in the cubic processing, which is the first scalefactor, and the relational expression (38) for calculating a value basedon Delta in the linear processing, which is the second scale factor.

Likewise, the DDA operand correction unit 124 performs correction basedon a difference between the relational expression (38) and therelational expression (21) upon switching of the order from the linearprocessing to the cubic processing.

In other words, the DDA operand correction unit 124 described aboveperforms correction when the order of the relational expression (38) forcalculating a value based on Delta in the linear processing, which isthe second scale factor, changes relative to the order of the relationalexpression (21) for calculating a value based on Delta in the cubicprocessing, which is the first scale factor.

EXAMPLE 2

An image processing apparatus that corrects DDA operands when thescaling processing is switched from the quadratic processing to thecubic processing will be described below as a second example of theimage processing apparatus 10 according to the first exemplaryembodiment of the present invention. Note that the configuration of theimage processing apparatus according to the second example is similar tothat of FIG. 3, so illustration and description thereof are omitted.

In the case of switching the scaling processing from the quadraticprocessing to the cubic processing, the correction value at the time ofswitching the scaling processing to the cubic processing is expressed as“2γ” with respect to Delta2, by comparison between the relationalexpressions (30) to (32) and the relational expressions (20) to (22).Then, the specific correction value is calculated using the correctionvalue “2γ”. Since the quadratic processing is carried out in this case,γ=c (constant) is satisfied, and the specific correction value is “2c”.

FIG. 7 is a diagram showing an algorithm and changes in values uponswitching from the quadratic processing to the cubic processing in thesecond example of the present invention. In FIG. 7, “RP. No.” of each ofthe Y data and C data represents the number of resampling points.Additionally, “CS” of “RP. No.” represents the number of resamplingpoints at the time of starting the cubic processing for the Y data. FIG.7 shows a case where the DDA processing is carried out when “RP. No.” isin a range from “CS−2” to “CS+4”.

Herein, “RP No.” defines the DDA operand of the C data with the DDAoperand in “CS−2”, which is two steps before “CS” with respect to the Ydata, as a reference. In other words, the DDA operand of the C data canbe calculated by the relational expressions (30) to (32) which arerelational expressions for the quadratic processing.

Specifically, when “RP. No.” of the Y data indicates “CS−2” in Step S71of FIG. 7, the resampling point is defined as “f”; Delta is defined as“a”; Delta2 is defined as “b”; and Delta3 is defined as “c”. Further,when “RP. No.” of the C data indicates “CS/2−1”, the resampling point isdefined as “f/2”; Delta is defined as “a+b/2”; Delta2 is defined as“2b”; and Delta3 is defined as “4c”. Note that Delta3 is not used in aquadratic processing section.

The processing flow is described below. A detailed description of thesame processing as that of FIG. 5 is omitted, and only the differencefrom the processing shown in FIG. 5 is mainly described below. Referringfirst to FIG. 7, in Steps S71 and S72, the quadratic processing isperformed on both the Y data and C data. Further, in Steps S73 to S77,the cubic processing is performed on both the Y data and C data.

In this case, regarding the C data, when the processing is switched fromthe quadratic processing to the cubic processing, that is, when OutCountcorresponds to “CS/2−1” in Step S108 of FIG. 4, the DDA operation unit123 determines “YES”. Then, the DDA operand correction unit 124 adds thecorrection value “2c” of Delta2 to Delta2, and outputs the value of thecorrected Delta2 to the DDA operation unit 123. Specifically, Delta2serving as the input value of the C data when “RP. No.” of FIG. 7indicates “CS/2” is represented by 2a+2b. Hereinafter, the cubicprocessing is carried out in Steps S75 and S77 in a similar manner as inthe Y data.

As shown in FIG. 7, the relational expressions (20) to (23) are alwayssatisfied in the cubic processing section, with the result that no colorshift occurs. This is because the relational expressions (20) to (23)are satisfied in Step S73 when Delta2 is corrected in Step S71 and usedas the input value in Step S73.

According to the second example of the present invention, the colorshift that occurs upon switching of the order between the non-linearscaling processings can be eliminated.

In other words, the DDA operand correction unit 124 described abovecorrects the C data, which is a signal having a low data rate, based ona difference between the expression (32) for calculating the differenceDelta2 based on the relational expression (31) for calculating a valuebased on Delta in the quadratic processing, which is the first scalefactor, and the expression (22) for calculating the difference Delta2based on the relational expression (21) for calculating a value based onDelta in the cubic processing, which is the second scale factor.

EXAMPLE 3

An image processing apparatus that corrects DDA operands when thescaling processing is switched from the quadratic processing to thelinear processing will be described below as a third example of theimage processing apparatus 10 according to the first exemplaryembodiment of the present invention. Note that the configuration of theimage processing apparatus according to the third example is similar tothat of FIG. 3, so illustration and description thereof are omitted.

In the case of switching the scaling processing from the quadraticprocessing to the linear processing, the correction value at the time ofswitching the scaling processing to the linear processing is expressedas −(½)d2y(2n) with respect to Delta, by comparison between therelational expression (31) the relational expression (38). Then, thecorrection value −(½)d2y(2n) is substituted into the relationalexpression (26) to calculate a specific correction value. Since β=β₂(constant) is satisfied in this case, the specific correction value canbe expressed by the following relational expression (44).

$\begin{matrix}{{{- \frac{1}{2}}d\; 2_{y}\left( {2n} \right)} = {{- \frac{1}{2}}\beta_{2}}} & (44)\end{matrix}$

Thus, the correction value −(½)b of Delta is obtained from therelational expression (44).

FIG. 8 is a diagram showing an algorithm and changes in values uponswitching from the quadratic processing to the linear processing in thethird example of the present invention. FIG. 8 shows the case where theDDA processing is carried out when “Dst. Data No.” is in the range from“LS−2” to “LS+2”, in a similar manner as in FIG. 5.

Herein, “Dst. Data No.” defines the DDA operand of the C data with theDDA operand in “LS−2”, which is two steps before “LS” with respect tothe Y data, as a reference. In other words, the DDA operands of the Cdata can be calculated by the relational expressions (30) to (32), whichare relational expressions for the quadratic processing, in a similarmanner as in FIG. 7 described above. The specific values in Step S81 ofFIG. 8 are values obtained by replacing “CS” by “LS” of FIG. 7, so thedescription thereof is omitted.

The processing flow is described below. A detailed description of thesame processing as that shown in FIG. 5 is omitted, and the differencefrom the processing shown in FIG. 5 is mainly described below. First, inSteps S81 and S82 of FIG. 8, the quadratic processing is performed onboth the Y data and C data. Further, in Steps S83 to S85, the linearprocessing is performed on both the Y data and C data.

In this case, regarding the C data, when the processing is switched fromthe quadratic processing to the linear processing, that is, whenOutCount corresponds to “LS/2−1” in Step S108 of FIG. 4, the DDAoperation unit 123 determines “YES”. Then, the DDA operand correctionunit 124 adds the correction value −(½)b of Delta to Delta, and outputsthe value of the corrected Delta to the DDA operation unit 123.Specifically, Delta serving as the input value of the C data when “Dst.Data No.” of FIG. 8 indicates “LS/2” is represented by a+2b.Hereinafter, the linear processing is carried out in Step S85 in asimilar manner as in the Y data.

As shown in FIG. 8, since the relational expressions (37) and (38) aresatisfied in the linear processing section, it can be said that theresampling positions of the Y data and C data are always the same.

According to the third example of the present invention, the color shiftthat occurs upon switching between the non-linear scaling processing andthe linear scaling processing of the quadratic processing can beeliminated.

[Other Exemplary Embodiments]

As described in the first to third examples of the present invention,the appropriate correction value is added to the DDA operands in thecase of switching processing of the DDA operation, thereby making itpossible to set the resampling positions of the Y data and C data to bealways the same. FIG. 9 shows a table indicating correction values usedat the time when the linear processing, quadratic processing, and cubicprocessing are mutually switched according to an exemplary embodiment ofthe present invention. For example, upon switching from the cubicprocessing to the quadratic processing, the correction can be achievedby adding a correction value “−2γ” to Delta2.

Note that the problem that the color shift occurs in the YCbCr 4:2:2format can be solved by performing scaling processing after upsamplingto the YCbCr 4:4:4 format as disclosed in Japanese Unexamined PatentApplication Publication No. 2007-74526. Meanwhile, according to anexemplary embodiment of the present invention, the amount of the C datais a half of that in the case of performing upsampling, therebyattaining an effect of saving memories and reducing the size of ascaling circuit. Furthermore, according to an exemplary embodiment ofthe present invention, the amount of the C data is reduced to a halfalso in the image processing subsequent to the scaling processing,thereby attaining an effect of reducing the circuit size of the wholeimage processing system.

Furthermore, the present invention is not limited to the above exemplaryembodiments, and various modifications can be made without departingfrom the above-mentioned scope of the present invention.

The first and other exemplary embodiments can be combined as desirableby one of ordinary skill in the art. Alternatively, the first, second,and third examples can be combined as desirable by one of ordinary skillin the art.

While the invention has been described in terms of several exemplaryembodiments, those skilled in the art will recognize that the inventioncan be practiced with various modifications within the spirit and scopeof the appended claims and the invention is not limited to the examplesdescribed above.

Further, the scope of the claims is not limited by the exemplaryembodiments described above.

Furthermore, it is noted that, Applicant's intent is to encompassequivalents of all claim elements, even if amended later duringprosecution.

1. An image processing apparatus that performs scaling processing onimage data including a plurality of signals having different data rates,comprising: a first scaling processing unit that performs a firstscaling processing according to a first scale factor in a first area;and a second scaling processing unit that performs a second scalingprocessing subsequent to the first scaling processing, according to asecond scale factor in a second area adjacent to the first area, whereinthe second scaling processing unit performs the second scalingprocessing on a signal having a high data rate with use of the firstscale factor, upon start of the second scaling processing, and performsthe second scaling processing on a signal having a low data rate withuse of the second scale factor obtained by correcting the first scalefactor.
 2. The image processing apparatus according to claim 1, whereinthe first scaling processing unit calculates the second scale factor forthe signal having the low data rate, by correcting the first scalefactor so that the second scale factor becomes a value obtained byperforming the second scaling processing on the first scale factor. 3.The image processing apparatus according to claim 1, wherein the firstscaling processing unit corrects the signal having the low data rate,based on a difference between a first relational expression forcalculating a value based on the first scale factor and a secondrelational expression for calculating a value based on the second scalefactor.
 4. The image processing apparatus according to claim 3, whereinthe first scaling processing unit corrects the signal having the lowdata rate, based on a difference between an expression for calculating adifference based on the first relational expression and an expressionfor calculating a difference based on the second relational expression.5. The image processing apparatus according to claim 1, wherein thefirst scaling processing unit performs correction when an order of asecond relational expression for calculating a value based on the secondscale factor changes relative to an order of a first relationalexpression for calculating a value based on the first scale factor. 6.The image processing apparatus according to claim 1, wherein: the signalhaving the high data rate comprises a luminance signal; and the signalhaving the low data rate comprises a color-difference signal indicatinga difference in color from the luminance signal.
 7. The image processingapparatus according to claim 1, wherein the data rate is based on YCbCr4:2:2 format.
 8. An image processing method that performs scalingprocessing on image data including a plurality of signals havingdifferent data rates, the image processing method comprising: performinga first scaling processing according to a first scale factor in a firstarea; and performing a second scaling processing subsequent to the firstscaling processing, according to a second scale factor in a second areaadjacent to the first area, performing the second scaling processing ona signal having a high data rate with use of the first scale factor,upon start of the second scaling processing, and performing the secondscaling processing on a signal having a low data rate with use of thesecond scale factor obtained by correcting the first scale factor. 9.The image processing method according to claim 8, wherein, in the firstscaling processing, the second scale factor is calculated for the signalhaving the low data rate by correcting the first scale factor so thatthe second scale factor becomes a value obtained by performing thesecond scaling processing on the first scale factor.
 10. The imageprocessing method according to claim 8, wherein, in the first scalingprocessing, the signal having the low data rate is corrected based on adifference between a first relational expression for calculating a valuebased on the first scale factor and a second relational expression forcalculating a value based on the second scale factor.
 11. The imageprocessing method according to claim 10, wherein, in the first scalingprocessing, the signal having the low data rate is corrected based on adifference between an expression for calculating a difference based onthe first relational expression and an expression for calculating adifference based on the second relational expression.
 12. The imageprocessing method according to claim 8, wherein, in the first scalingprocessing, correction is performed when an order of a second relationalexpression for calculating a value based on the second scale factorchanges relative to an order of a first relational expression forcalculating a value based on the first scale factor.
 13. The imageprocessing method according to claim 8, wherein: the signal having thehigh data rate comprises a luminance signal; and the signal having thelow data rate comprises a color-difference signal indicating adifference in color from the luminance signal.
 14. The image processingmethod according to claim 8, wherein the data rate is based on YCbCr4:2:2 format.